<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,minimum-scale=1,maximum-scale=1">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    {% load static %}
    <link rel="stylesheet" href={% static "css/font-awesome.min.css" %}>
    <link rel="stylesheet" href={% static "css/base.css" %}>
    {% block extracss %} {% endblock extracss %}
    <title>opsystem</title>
</head><body>{% csrf_token %}
{% block body %}
<aside class="l-aside">
    <ul class='l-navigation'>
        <li class='l-log'>
            <h1>OPSYSTEM</h1>
            <span class='fa fa-bars'></span>
        </li>
        <li class='l-profile'>
            {% get_static_prefix as static_prefix %}
            <div class="l-profile-header">
                <a href="#" alt='info'>
                    <span class='fa fa-info'></span>
                </a>
                <!-- 用户头像 在firefox中不显示 计划用ajax来获取地址-->
                <!--<img class='l-user-img' src={{ static_prefix }}{{ request.user.user_head_img }} ><br>-->
                <img class='l-user-img' src="/static/uploads/user_head_img/1.jpg"><br>
                <a class='l-message' href="#" alt='message'>
                    <span class='fa fa-envelope'></span>

                </a>
            </div>
            <div class="l-profile-footer">
                <a class='l-user' href="#">{{ reqeust.user.usernmae }}DengRongFei</a>
                <a class='l-role' href="#">{{ reqeust.user.role }}Adminstrator</a>
            </div>
        </li>
        <li class='l-title'>Navigation</li>
        <li class='l-item'>
            <a href="#">
                <span class='fa fa-tachometer'></span>
                <span class='item-title'><a href="{% url 'dashboard' %}">仪表盘</a></span>
                <span class='fa'></span>
            </a>
        </li>
        <li class='openable l-item'>
            <p>
                <span class='fa fa-server'></span>
                <span class='item-title'><a href={% url 'hosts' %}>主机管理</a></span>
                <span class="fa fa-angle-down js-change-icon"></span>
            </p>
            <ul class='l-sub-ul'>
              <!--#TODO  刷新主机集成到主机列表 作为一个按钮出现;后续将删除此条目-->
            <li class='fa'><a href={% url 'host_init' %}>初始化主机</a></li>
            <li class='fa'><a href={% url 'host_refurbish' %}>刷新主机</a></li>
            <li class='fa'><a href={% url 'hosts' %}>主机列表</a></li>
            </ul>

        </li>
        <li class='openable l-item'>
            <p>
                <span class='fa fa-codepen'></span>
                <span class='item-title'><a href={% url 'items' %}>项目管理</a></span>
                <span class='fa fa-angle-down js-change-icon'></span>
            </p>
            <ul class='l-sub-ul'>
                <li class='fa'><a href={% url 'items' %}>项目列表</a></li>
                <li class='fa'><a href={% url 'items_soft' %}>itemsoft</a></li>
                <li class='fa'><a href={% url 'softs' %}>softs</a></li>
            </ul>
        </li>
        <li class='openable l-item'>
            <p>
                <span class='fa fa-bars'></span>
                <span class='item-title'><a href="#"></a>监控管理</span>
                <span class="fa fa-angle-down js-change-icon"></span>
            </p>
            <ul class='l-sub-ul'>
                <li class='fa'><a href="#">系统监控</a></li>
                <li class='fa'><a href="#">服务监控</a></li>
                <li class='fa'><a href="#">项目监控</a></li>
            </ul>
        </li>
        <li class='openable l-item'>
            <p>
                <span class='fa fa-code'></span>
                <span class='item-title'>代码发布</span>
                <span class="fa fa-angle-down js-change-icon"></span>
            </p>
            <ul class='l-sub-ul'>
                <li class='fa'><a href={% url 'codepush_add' %}>创建代码上线申请</a></li>
                <li class='fa'><a href={% url 'codepush' %}>代码上线记录</a></li>
            </ul>
        </li>

        <li class='l-item'>
            <a href="#">
                <span class='fa fa-tasks'></span>
                <span class='item-title'><a href="{% url 'tasks' %}">任务管理</a></span>
                <span class='fa'></span>
            </a>
        </li>
        <li class='l-item'>
            <a href="#">
                <span class='fa fa-edit'></span>
                <span class='item-title'><a href="#">权限管理</a></span>
                <span class='fa'></span>
            </a>
        </li>
        <li class='l-item'>
            <a href="#">
                <span class='fa fa-group'></span>
                <span class='item-title'><a href={% url 'usermanage' %}>用户管理</a></span>
                <span class='fa'></span>
            </a>
        </li>
        <li class='l-item'>
            <a href="#">
                <span class='fa fa-envelope-open-o'></span>
                <span class='item-title'><a href="#">信息中心</a></span></a>
        </li>
    </ul>
</aside>
<div class="r-container">
    <header class='r-header'>
        <nav>
            <div class='h-l-nav'>
                <li class="header-toggle"><span class="fa fa-outdent "></span></li>
                <form class="header-form" action="index.html" method="post">{% csrf_token %} <li class="fa fa-search header-search">
                        <input type="search" placeholder='Search' name="" value="">
                </form>
            </div>

            <div class="h-r-nav">
                <li class='fa hrnav-task'>task</li>
                <li class='fa hrnav-message'>messages</li>
                <a href={% url 'logout' %}>
                    <li class='fa hrnav-logout'>logout</li>
                </a>
            </div>
        </nav>
    </header>

    <main class='r-main'>
        <ul class='breadbar'>
            <li class='fa '><a href="#">home</a></li>
            <li>dashboard</li>
        </ul>


        <div class="dash-wrapper main-wrapper">
            {% block main%}
            <div class="dash-item">
                <div class="widget-icon fa user-count"></div>
                <p class="widget-data">
                    <span>USER TOTAL：</span>
                    <span>{{ user_count }}</span>
                    <span>op/dev/prod</span>
                </p></div>
            </p>
            <div class="dash-item">

                <div class="widget-icon fa message-count"></div>
                <p class="widget-data">
                    <span>NEW MESSAGES:</span>
                    <span>10</span>
                    <span>On the messagebox</span>
                </p>
            </div>
            <div class="dash-item">
                <div class="widget-icon fa host-count"></div>
                <p class="widget-data">
                    <span>HOST TOTAL:</span>
                    <span>{{ host_count }}</span>
                    <span>On the messagebox</span>
                </p>
            </div>
            <div class="dash-item">
                <div class="widget-icon fa items-count"></div>
                <p class="widget-data">
                    <span>ITEMS TOTAL:</span>
                    <span>10</span>
                    <span>On the messagebox</span>
                </p>
            </div>
            <div class="dash-item">
                <div class="widget-icon fa task-count"></div>
                <p class="widget-data">
                    <span>TASK TOTAL:</span>
                    <span>10</span>
                    <span>On the messagebox</span>
                </p>
            </div>
            {% endblock main %}

        </div>
    </main>

</div>

{% endblock body %}
<script type="text/javascript">
    var jscsrftoken = "{{ csrf_token  }}"
</script>
<script src={% static "js/jquery-3.1.1.min.js" %}></script>
<script src ={% static "js/base.js" %} ></script>
{% block extracjs %} {% endblock extracjs %}
</body>

</html>
